<html><head><title>Profile</title></head>
    <body>

<?php
$name=mysql_query("SELECT name FROM login WHERE id='$_session[userid]' LIMIT 1",$con) or die(mysql_error("Their is some error in your coading or db").'<br> SQL:'.$name);
$name=mysql_fetch_row($name);
$dept=mysql_query("SELECT department FROM login WHERE id='$_session[userid]' LIMIT 1",$con) or die(mysql_error("Their is some error in your coading or db").'<br> SQL:'.$dept);
$dept=mysql_fetch_row($dept);
$phone=mysql_query("SELECT 'phone number' FROM login WHERE id='$_session[userid]' LIMIT 1",$con) or die(mysql_error("Their is some error in your coading or db").'<br> SQL:'.$phone);
$phone=mysql_fetch_row($phone);
$email=mysql_query("SELECT email FROM login WHERE id='$_session[userid]' LIMIT 1",$con) or die(mysql_error("Their is some error in your coading or db").'<br> SQL:'.$email);
$email=mysql_fetch_row($email);
$address=mysql_query("SELECT address FROM login WHERE id='$_session[userid]' LIMIT 1",$con) or die(mysql_error("Their is some error in your coading or db").'<br> SQL:'.$address);
$address=mysql_fetch_row($address);
echo "Welcome ".$name[0]."</br></br>";
echo "<h2>"."</t></t>"."PROFILE"."</h2>";

        echo "<table border='2' cellspacing='2'>";
           echo "<thead>";
                echo "<tr>";
                    echo "<th></th>";
                    echo "<th></th>";
                echo "</tr>";
            echo "</thead>";
            echo "<tbody>";
                echo "<tr>";
                    echo "<td>Name</td>";
                    echo "<td>".$name[0]."</td>";
                echo "</tr>";
                echo "<tr>";
                    echo "<td>Register Number</td>";
                    echo "<td>".$_session["userid"]."</td>";
                echo "</tr>";
                echo "<tr>";
                    echo "<td>Department</td>";
                    echo "<td>".$dept[0]."</td>";
                echo "</tr>";
                echo "<tr>";
                    echo "<td>Mail ID</td>";
                    echo "<td>".$email[0]."</td>";
                echo "</tr>";
                echo "<tr>";
                    echo "<td>Phone number</td>";
                    echo "<td>".$phone[0]."</td>";
                echo "</tr>";
                
            echo "</tbody>";
        echo "</table>";

?>

    </body>
</html>